<?php
/**
 * Created by PhpStorm.
 * User: Mysic
 * Date: 2020/11/1
 * Time: 16:42
 */

namespace app\factory;

use app\mocks\extend\MockRedis;
use think\Env;

class RedisFactory
{
    public static function instance()
    {
        if(Env::get('mock.redis')) {
            return MockRedis::instance();
        }
        return new \Redis();
    }
}